package com.demo.example.algorithm;

import java.util.Arrays;
import java.util.Scanner;

public class TheNumAppearMoreThanHalf {
    public static void main(String[] args) {
        Scanner scanner=new Scanner(System.in);
        while(scanner.hasNext()){
            int n=scanner.nextInt();
            int[] array=new int[n];
            for(int i=0;i<n;i++){
                array[i]=scanner.nextInt();
            }
            Arrays.sort(array);
            System.out.println(array[n/2]);
        }
    }
}
